package cn.gson.crm.model.pojos;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "WAOU_DETAILS", schema = "CRM", catalog = "")
public class WaouDetails {
    private long woId;
    private String woName;
    private String woCompany;
    private Long woPrice;
    private Long woNumber;
    private String woSize;
    private String woColor;
    private Long woCaijia;
    private Outbound outbound;
    private Warehousing warehousing;
    @ManyToOne//可选属性optional=false,表示author不能为空。删除文章，不影响用户
    @JoinColumn(name = "wa_id")//设置在article表中的关联字段(外键)
    public Warehousing getWarehousing() {
        return warehousing;
    }

    public void setWarehousing(Warehousing warehousing) {
        this.warehousing = warehousing;
    }
    @ManyToOne//可选属性optional=false,表示author不能为空。删除文章，不影响用户
    @JoinColumn(name = "ou_id")//设置在article表中的关联字段(外键)
    public Outbound getOutbound() {
        return outbound;
    }

    public void setOutbound(Outbound outbound) {
        this.outbound = outbound;
    }

    @Id
    @Column(name = "WO_ID", nullable = false, precision = 0)
    @GeneratedValue(generator  =  "seq",strategy  =  GenerationType.SEQUENCE)
    //定义一个序列生成器
    @SequenceGenerator(name  =  "seq",sequenceName  =  "crm",
            initialValue  =  1,allocationSize  =  1)
    public long getWoId() {
        return woId;
    }

    public void setWoId(long woId) {
        this.woId = woId;
    }

    @Basic
    @Column(name="WO_CAIJIA")
    public Long getWoCaijia() {
        return woCaijia;
    }

    public void setWoCaijia(Long woCaijia) {
        this.woCaijia = woCaijia;
    }

    @Basic
    @Column(name = "WO_NAME", nullable = true, length = 255)
    public String getWoName() {
        return woName;
    }

    public void setWoName(String woName) {
        this.woName = woName;
    }

    @Basic
    @Column(name = "WO_COMPANY", nullable = true, length = 255)
    public String getWoCompany() {
        return woCompany;
    }

    public void setWoCompany(String woCompany) {
        this.woCompany = woCompany;
    }

    @Basic
    @Column(name = "WO_PRICE", nullable = true, precision = 2)
    public Long getWoPrice() {
        return woPrice;
    }

    public void setWoPrice(Long woPrice) {
        this.woPrice = woPrice;
    }

    @Basic
    @Column(name = "WO_NUMBER", nullable = true, precision = 0)
    public Long getWoNumber() {
        return woNumber;
    }

    public void setWoNumber(Long woNumber) {
        this.woNumber = woNumber;
    }

    @Basic
    @Column(name = "WO_SIZE", nullable = true, length = 200)
    public String getWoSize() {
        return woSize;
    }

    public void setWoSize(String woSize) {
        this.woSize = woSize;
    }

    @Basic
    @Column(name = "WO_COLOR", nullable = true, length = 255)
    public String getWoColor() {
        return woColor;
    }

    public void setWoColor(String woColor) {
        this.woColor = woColor;
    }



}
